$.fn.verticalTabSetIdx = function(a) {
    var c, d, e, f, g, b = $(this);
    if (1 == b.attr("iframeMode") || "true" == b.attr("iframeMode")) {
        if (d = b.find("a").eq(a), e = b.data("data"), !e) return;
        f = "list", b.attr("dataRoot") && (f = b.attr("dataRoot")), c = e[f].length, g = b.find(".verticalTab_con").eq(0).find("iframe").eq(0), 
        g.attr("src", e[f][a].url), d.prevAll("a").find("span").removeClass("verticalTab_current_middle"), 
        d.nextAll("a").find("span").removeClass("verticalTab_current_middle"), d.find("span").addClass("verticalTab_current_middle");
    } else d = b.find(".verticalTab_normal_middle").eq(a), c = b.find(".verticalTab_con").length, 
    b.find(".verticalTab_con").hide(), b.find(".verticalTab_con").eq(a).fadeIn(), d.prevAll("span").removeClass("verticalTab_current_middle"), 
    d.nextAll("span").removeClass("verticalTab_current_middle"), d.addClass("verticalTab_current_middle");
    d.prevAll("span").removeClass("verticalTab_current_top"), d.prevAll("span").removeClass("verticalTab_current_middle"), 
    d.prevAll("span").removeClass("verticalTab_current_bottom"), d.nextAll("span").removeClass("verticalTab_current_top"), 
    d.nextAll("span").removeClass("verticalTab_current_middle"), d.nextAll("span").removeClass("verticalTab_current_bottom"), 
    d.prev().addClass("verticalTab_current_top"), d.next().addClass("verticalTab_current_bottom"), 
    b.trigger("actived", a);
}, $.fn.verticalTabSetEnable = function(a, b) {
    var d, e, f, g, c = $(this);
    if (1 == c.attr("iframeMode") || "true" == c.attr("iframeMode")) {
        if (f = c.data("data"), !f) return;
        g = "list", c.attr("dataRoot") && (g = c.attr("dataRoot")), d = f[g].length, e = c.find("a").eq(a), 
        1 == b ? (e.find("span").removeClass("disabled"), e.bideClickIframe(!0, c, a, d)) : (e.find("span").addClass("disabled"), 
        e.bideClickIframe(!1, c, a, d));
    } else d = c.find(".verticalTab_con").length, e = c.find(".verticalTab_normal_middle").eq(a), 
    1 == b ? (e.removeClass("disabled"), e.bideClick(!0, c, a, d)) : (e.addClass("disabled"), 
    e.bideClick(!1, c, a, d));
}, $.fn.verticalTabRender = function() {
    function q(h) {
        h && (b = h[i].length, $.each(h[i], function(h, i) {
            var k, l, m, n, o, j = uncompile(quiLanguage.basicTab.tabName);
            i.name && (j = i.name), d == h && g.attr("src", i.url), k = $('<span class="verticalTab_normal_top"></span>'), 
            c.append(k), d == h && k.addClass("verticalTab_current_top"), l = $('<span class="verticalTab_normal_middle"><div class="verticalTab_normal_middle_con"></div></span>'), 
            m = $("<a></a>"), m.attr("href", i.url), m.attr("target", f), l.find("div").text(j), 
            m.append(l), c.append(m), e || l.addClass("disabled"), n = !0, i.itemDisabled && ("true" == i.itemDisabled || 1 == i.itemDisabled) && (l.addClass("disabled"), 
            n = !1), l.data("idx", h), d == h && l.addClass("verticalTab_current_middle"), o = $('<span class="verticalTab_normal_bottom"></span>'), 
            c.append(o), d == h && o.addClass("verticalTab_current_bottom"), e && n ? m.bideClickIframe(!0, a, h, b) : m.bideClickIframe(!1, a, h, b);
        }));
    }
    var b, e, f, g, h, i, j, k, m, n, o, p, a = $(this), c = $('<div class="verticalTab_left"></div>'), d = 0;
    if (a.attr("selectedIdx") && (d = Number(a.attr("selectedIdx"))), e = !0, (1 == a.attr("allItemDisabled") || "true" == a.attr("allItemDisabled")) && (e = !1), 
    f = "frmrightChild", h = !1, (1 == a.attr("showProgress") || "true" == a.attr("showProgress")) && (h = !0), 
    1 == a.attr("iframeMode") || "true" == a.attr("iframeMode")) {
        if (a.find(">div").length > 1 && alert(uncompile(quiLanguage.basicTab.errorMessage)), 
        a.find(">div").addClass("verticalTab_con"), a.find(">div").css({
            overflowX: "hidden",
            overflowY: "auto"
        }), g = a.find(">div").eq(0).find("iframe").eq(0), g.attr("name") && (f = g.attr("name")), 
        i = "list", a.attr("dataRoot") && (i = a.attr("dataRoot")), j = a.attr("params")) try {
            k = JSON.parse(j);
        } catch (l) {
            k = "", alert(uncompile(quiLanguage.basicTab.paramErrorMessage));
        } else k = "";
        if (m = "", n = a.attr("url"), o = a.attr("data"), p = a.data("data")) q(p); else if (o) {
            try {
                m = JSON.parse(o);
            } catch (l) {
                m = "", alert(uncompile(quiLanguage.basicTab.dataErrorMessage));
            }
            a.data("data", m), q(m);
        } else n && $.ajax({
            url: a.attr("url"),
            dataType: "json",
            data: k,
            error: function() {
                alert(uncompile(quiLanguage.basicTab.urlErrorMessage));
            },
            success: function(b) {
                a.data("data", b), m = b, q(b);
            }
        });
    } else b = a.find(">div").length, a.find(">div").each(function(f) {
        var h, i, j, k, g = uncompile(quiLanguage.basicTab.tabName);
        $(this).attr("name") && (g = $(this).attr("name")), $(this).addClass("verticalTab_con"), 
        d != f && $(this).hide(), h = $('<span class="verticalTab_normal_top"></span>'), 
        c.append(h), d == f && h.addClass("verticalTab_current_top"), i = $('<span class="verticalTab_normal_middle"><div class="verticalTab_normal_middle_con"></div></span>'), 
        c.append(i), i.find("div").text(g), i.data("idx", f), e || i.addClass("disabled"), 
        j = !0, ("true" == $(this).attr("itemDisabled") || 1 == $(this).attr("itemDisabled")) && (i.addClass("disabled"), 
        j = !1), d == f && i.addClass("verticalTab_current_middle"), k = $('<span class="verticalTab_normal_bottom"></span>'), 
        c.append(k), d == f && k.addClass("verticalTab_current_bottom"), e && j && i.bideClick(!0, a, f, b);
    });
    a.prepend(c), a.append('<div class="clear"></div>');
}, $.fn.bideClick = function(a, b, c) {
    var e = $(this);
    e.unbind("click"), a && e.bind("click", {}, function() {
        b.find(".verticalTab_con").hide(), b.find(".verticalTab_con").eq(c).fadeIn(), $(this).prevAll("span").removeClass("verticalTab_current_top"), 
        $(this).prevAll("span").removeClass("verticalTab_current_middle"), $(this).prevAll("span").removeClass("verticalTab_current_bottom"), 
        $(this).nextAll("span").removeClass("verticalTab_current_top"), $(this).nextAll("span").removeClass("verticalTab_current_middle"), 
        $(this).nextAll("span").removeClass("verticalTab_current_bottom"), $(this).addClass("verticalTab_current_middle"), 
        $(this).prev().addClass("verticalTab_current_top"), $(this).next().addClass("verticalTab_current_bottom"), 
        b.trigger("actived", c);
    });
}, $.fn.bideClickIframe = function(a, b, c) {
    var e = $(this);
    e.unbind("click"), a ? e.bind("click", {}, function() {
        if ($(this).prevAll("span").removeClass("verticalTab_current_top"), $(this).prevAll("span").removeClass("verticalTab_current_middle"), 
        $(this).prevAll("span").removeClass("verticalTab_current_bottom"), $(this).prevAll("a").find("span").removeClass("verticalTab_current_middle"), 
        $(this).nextAll("span").removeClass("verticalTab_current_top"), $(this).nextAll("span").removeClass("verticalTab_current_middle"), 
        $(this).nextAll("span").removeClass("verticalTab_current_bottom"), $(this).nextAll("a").find("span").removeClass("verticalTab_current_middle"), 
        $(this).find("span").addClass("verticalTab_current_middle"), $(this).prev().addClass("verticalTab_current_top"), 
        $(this).next().addClass("verticalTab_current_bottom"), "true" == b.attr("showProgress") || 1 == b.attr("showProgress")) try {
            showProgressBar();
        } catch (a) {}
        b.trigger("actived", c);
    }) : e.bind("click", {}, function() {
        return !1;
    });
};